<!--#INCLUDE FILE="conn.asp"-->
<!-- #include file="aFunction_charCode.asp" -->
<!-- #include file="ad_comSub.asp" -->
<!-- #include file="ad_function.asp" -->

<%
Call tslt_useridentity12_error_end()

If session("tslt_useridentity")=1 Or session("tslt_useridentity")=2 Then
    Call setupC()
End If 
%>

<html>
<head>
<title></title>
<link href=../style/<%=session("tslt_stylefolder")%>/admin.css rel="stylesheet" type="text/css">
</HEAD>
<body bgcolor=#aaaac4>
<center>
<br>
<table><tr><td class="font2"></td></tr></table>
<br>
 <table width="85%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
                 <td align="left" valign="middle" bgcolor="#f7f6f6">
                      <img src="../images/tushan2.gif" align="middle" width=100 height=50>
                      <font size=3><b>&nbsp;>>&nbsp;<a class=a1 href="bm_create.asp">°</a></b></font>
                 </td>
        </tr>
</table>

<br>
<table width="690" border="1" cellspacing="0" cellpadding="0" bgcolor="#f7f6f6">
       <tr align=center>
                <td colspan=5>
                       <table width="690" border="0">
                              <tr align=center>
                                    <td width="18%"><b></b></td>
                                    <td width="177"><b></b></td>
                                    <td width="177"><b></b></td>
                                    <td width="45"><b></b></td>
                                    <td><b></b></td>
                              </tr>
                       </table>
                </td>
       </tr>
<%
       dim Communityrs
       dim Communitysql
       Communitysql="select * from community order by CommunitySort asc"
       set Communityrs=conn.execute(Communitysql)
              if Communityrs.eof then response.write "<SCRIPT language=Javascript>passwords(promptInfo_bm(0))</SCRIPT>"
                  do while not Communityrs.eof
                       Communityid2=Communityrs("id")
%>
                       <tr>
                              <td colspan=5>
                              <table width="690" border="0" cellspacing="1" cellpadding="1">
<%
                               dim rs
                               dim sql
                               sql="select * from board where Communityid="&Communityrs("id")&" order by boardsort ASC"
                               set rs=conn.execute(sql)
                                      if rs.eof then
                                             response.write "<tr align=center bgcolor='#dcdcdc'><td width='18%'>" & Communityrs("CommunityName") & "<td colspan=4 align=left>ǰûа&nbsp;&nbsp;<b><a class=a1 href='bm_create.asp'>°</a><b></td>"
                                             response.write "<tr height='5'><td></td></tr>"
                                      else
                                             response.write "<tr align=center bgcolor='#dcdcdc'>"
                                             response.write "<td width='18%' rowspan=" &bm_ListCount(Communityrs("id"))& ">"
                                             response.write Communityrs("CommunityName")
                                             If Communityrs("CommunityHidden")=True Then response.write "<SCRIPT language=Javascript>passwords(promptInfo_bm(6))</SCRIPT>"
                                             do while not rs.eof
%>
                                                   <tr align=center bgcolor="#dcdcdc">
                                                        <td width='180'>
                                                               <%if rs("boardimg")="" then%>
                                                                        <font face="" color=<%=rs("wordcolor")%>><%=rs("boardname")%></font>
                                                               <%else%>
                                                                        <img src="../<%=rs("boardimg")%>" title="<%=rs("boardimg")%>" class="hand" width=160 height=32>
                                                               <%end if%>
                                                        </td>
                                                        <td width='180' align=left style='word-break:break-all'>[<%=rs("boardsort")%>]&nbsp;<%=rs("boardname")%> </td>
                                                        <td width="45"><input type="button" value="޸" name="modibtn" onClick="location.href='bm_modify.asp?boardid=<%=rs("boardid")%>';"> <input type="button" value="ɾ" name="delbtn" onClick="if(confirm('ҪɾðɾͬʱɾðȫӼ¼ز'))location='bm_delete.asp?boardid=<%=rs("boardid")%>';"></td>
                                                        <td align=right>
<%
                                                               if rs("authentication")=true And rs("autSel")=False then response.write "<SCRIPT language=Javascript>passwords(promptInfo_bm(1))</SCRIPT>" else response.write ""
                                                               if rs("boardhidden")=true then response.write "<SCRIPT language=Javascript>passwords(promptInfo_bm(2))</SCRIPT>" else response.write ""
                                                               if rs("boardreadonly")=true then response.write "<SCRIPT language=Javascript>passwords(promptInfo_bm(3))</SCRIPT>" else response.write ""
                                                               if rs("mark")=true then response.write "<SCRIPT language=Javascript>passwords(promptInfo_bm(4))</SCRIPT>" else response.write ""
                                                               if rs("autSel")=true then response.write "<SCRIPT language=Javascript>passwords(promptInfo_bm(5))</SCRIPT>" else response.write ""
%>
                                                        </td>
<%
                                                        rs.movenext
                                             loop
                                             response.write "<tr height='5'><td></td></tr>"
                                      end if
                               rs.close
                               set rs=nothing
%>
                              </table>
                              </td>
                        </tr>
<%
                       Communityrs.movenext
                  loop
       Communityrs.close
       set Communityrs=nothing 
%>
</table>
</center>
</body>
</html>
<%
Call conn_Nothing()

Function bm_ListCount(aaa)
    Dim rs
    Dim sql
    sql="select count(boardid) as B_Count from board where Communityid="&aaa
    Set rs=conn.execute(sql)
        Dim n 
        n = 1
        If rs("B_Count")<>0 Then
	        n = n + rs("B_Count")
        Else 
            n = 1
	    End If 
    rs.close
    Set rs=Nothing
    bm_ListCount = n
End Function


%>

